using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SysFrame.Message;
using System.Reflection;

namespace SysFrame.BP
{
    /// <summary>
    /// system_6方法
    /// </summary>
    public class BLLsystem_6
    {
        public Isystem_6 interface_system_6;

        public BLLsystem_6()
        {
            object obj = BPBase.GetAchieve("SysFrame.BP","system_6");
            interface_system_6 = (Isystem_6)obj;
        }


        /// <summary>
        /// 得到system_6实体
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public List<Mssystem_6> Getsystem_6MsByQuery(MsQuery msq)
        {
            return interface_system_6.Getsystem_6MsByQuery(msq);
        }

        /// <summary>
        /// 通过System_6_10得到实体
        /// </summary>
        /// <param name="System_6_10">ID</param>
        /// <returns>实体</returns>
        public Mssystem_6 Getsystem_6MsByKey(string System_6_10)
        {
            MsQuery msquery = new MsQuery();
            msquery.strquery += " and System_6_10='" + System_6_10 + "' ";
            List<Mssystem_6> lstData = Getsystem_6MsByQuery(msquery);
            return lstData[0];
        }

        /// <summary>
        ///  保存system_6信息
        /// </summary>
        /// <param name="ms">实体信息</param>
        /// <returns>消息</returns>
        public MsReturned Savesystem_6(Mssystem_6 ms)
        {
            return interface_system_6.Savesystem_6(ms);
        }

        /// <summary>
        /// 得到数据类型
        /// </summary>
        /// <param name="msquery">条件</param>
        /// <returns>数据类型</returns>
        public MsReturned Getsystem_6ByQuery(MsQuery msquery)
        {
            return interface_system_6.Getsystem_6ByQuery(msquery);
        }

        /// <summary>
        /// 删除system_6
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deletesystem_6ByQuery(MsQuery msq)
        {
            return interface_system_6.Deletesystem_6ByQuery(msq);
        }
        /// <summary>
        /// 删除system_6
        /// </summary>
        /// <param name="msq">条件</param>
        /// <returns></returns>
        public MsReturned Deletesystem_6ByKey(string System_6_10)
        {
            MsQuery msquery = new MsQuery();
            
             if (System_6_10.IndexOf(",") > 0)
            {
                msquery.strquery += " and System_6_10 in (" + System_6_10 + ") ";
            }
            else
            {
                msquery.strquery += " and System_6_10='" + System_6_10 + "' ";
            }
            return interface_system_6.Deletesystem_6ByQuery(msquery);
        }
    }
}
